package xcmg.device.infra.enums;

/**
 * Created by wrg on 2019/7/10.
 */
public enum RatingConfigTimeEnum {
    SalesCompletionConfig(1, "销售完成情况配置"),
    MonthPlanAccuracyConfig(2, "月度计划准确性配置"),
    OrderManagementNormativeConfig(3, "订单管理规范性配置"),
    OverallSalesCompletionRateConfig(4, "总体销售完成率配置")
    ;

    private String desc;
    private int code;

    RatingConfigTimeEnum(int code, String desc) {
        this.desc = desc;
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public int getCode() {
        return code;
    }

    public static String getDescByCode(int code) {
        for (RatingConfigTimeEnum ratingConfigTimeEnum : RatingConfigTimeEnum.values()) {
            if (ratingConfigTimeEnum.getCode()== code ) {
                return ratingConfigTimeEnum.getDesc();
            }
        }
        return null;
    }
}
